package com.luych.common.util;

import java.io.File;

public class FileUtil {

    public static void deleteFolder(String folderPath) {
        File file = new File(folderPath);
        if (!file.exists()) {
            return;
        }
        if (file.isFile()) {
            file.delete();
            return;
        }
        for (File child : file.listFiles()) {
            deleteFolder(child.getPath());
        }
        file.delete();
    }
}
